<script>
	let isNotch = false
	export default {
		onLaunch: function() {
			isNotch = plus.navigator.hasNotchInScreen()
			let isLogin = uni.getStorageSync('isLogin')
			let token = uni.getStorageSync('token')
			if (isLogin || token) {
				console.log('直接展示')
				this.$store.commit('login')
				uni.navigateTo({
					url: '/pages/index/index',
					animationDuration: 500,
					animationType: 'pop-in'
				})
			}
			console.log('App Launch',this.$store.state.isLogin)
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			uni.setStorage({
				key: 'isLogin',
				data: this.$store.state.isLogin
			})
			console.log('App Hide',this.$store.state.isLogin)
		},
		mounted() {
			console.log(isNotch,'刘海屏')
		}
	}
</script>

<style>
	page {
		font-family: PingFangSC-bold;
	}
</style>
